//
//  Headbutton.m
//  hello
//
//  Created by 查传申 on 15/12/10.
//  Copyright © 2015年 查传申. All rights reserved.
//

#import "Headbutton.h"

@implementation Headbutton
-(id)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        self.label_tip  = [[UILabel alloc]initWithFrame:CGRectMake(0, 0, frame.size.width/4, frame.size.height)];
        _label_tip.backgroundColor = [UIColor redColor];
        
        self.label_time = [[UILabel alloc]initWithFrame:CGRectMake(_label_tip.frame.origin.x  +_label_tip.frame.size.width +10 ,0,frame.size.width/3, frame.size.height)];
        _label_time.backgroundColor = [UIColor greenColor];
        
        self.label_description = [[UILabel alloc]initWithFrame:CGRectMake(_label_time.frame.origin.x + _label_time.frame.size.width + 10, 0, frame.size.width/3, frame.size.height)];
        _label_description.backgroundColor = [UIColor purpleColor];
        [self addSubview:_label_tip];
        [self addSubview:_label_time];
        [self addSubview:_label_description];
    }
    return self;
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
